﻿@model Olemas.Models.Conspect
@{
    ViewBag.Title = "Konspekti info";
    ViewBag.CurrentPage = "conspectsPage"; 
}
@section AddToHead{
}


<div id="detailsPanel" class="detailsPanel">

    <div id="headingsDiv" class="headingsDiv">
        @Html.Label("Nimi: ")
        @Html.Label("Aine: ")
        @Html.Label("Õppekava: ")
        @Html.Label("Lisatud: ")
        @Html.Label("Lisainfo: ")
    </div>

    <div id="valuesDiv" class="valuesDiv">
        <label>@Html.DisplayFor(x => x.Name)</label>
        <label>@Html.DisplayFor(x => x.Course.Name)</label>
        <label>@Html.DisplayFor(x => x.Course.Faculty.Name)</label>
        <label>@Html.DisplayFor(x => x.DateAdded)</label>
        @Html.TextArea("descriptionTextBox", Model.Description ?? "", new { rows = 5, @readonly = "true", placeholder = "Siia pole midagi lisatud.." })
    </div>

    <div class="conspectFilesDiv">
        @foreach (var file in Model.Conspect_Files)
        {
            <a href="@Url.Action("DownloadConspect", "Details", new { id = file.Id })" title="Lae alla!">
                <img src='~/Content/Site_Images/@(file.Extension).png' alt=""/>
                @Html.LabelFor(name => file.Location, file.Location)
            </a>
        }
    </div>

    <label id="kommentaarid">Kommentaarid: </label>

    <div id="commentsDiv" class="commentsDiv">
        @Html.Action("Comments", "Comments", new { page = 1, itemId = Model.Id, typeId = 2 })
    </div>


</div>

@section AddToFooter{
    <script type="text/javascript">
        $(document).ready(function () {

        });
    </script>
}
